<!DOCTYPE html> 
<html> 
<head>  
    <!--META-->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=0.75">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">

    <!--CSS-->
    <link rel="stylesheet" href="API/css/themes/default/jquery.mobile.min.css" />
    <link rel="stylesheet" href="API/css/themes/default/jquery.mobile.structure.min.css" />
    <link rel="stylesheet" href="API/css/themes/default/jquery.mobile.theme.min.css" />
    <link rel="stylesheet" href="API/css/mycss.css" />
    <link rel="stylesheet" href="css/mycss.css" />

    <!--JS-->
    <script type="text/javascript" src="API/js/jquery.min.js"></script>
    <script type="text/javascript" src="API/js/jquery.mobile.min.js"></script>
    <script type="text/javascript" src="API/js/highcharts.js"></script>
    <script type="text/javascript" src="API/js/modules/exporting.js"></script>
    <!--<script type="text/javascript" src="API/js/jquery.dataTables.min.js"></script>--> 
    <script type="text/javascript" src="include/config.js"></script>
    <script type="text/javascript" src="API/js/fonctions.js"></script>
    <script type="text/javascript" src="js/fonctions.js"></script>

    <script language="javascript" type="text/javascript">
    checkMaintenance();
    checkAuthentification();
	
		///////////////////
		//BLOCK VARIABLE GLOBAL
		///////////////////
		var id_page = 5;
	
		///////////////////
		//BLOCK VARIABLE GLOBAL
		///////////////////
	
        var strLibFerme = "Ferm\351";
        var strLibFermeNom = "fermes";
        var strLibFermeCourt = "CL";
        var strLibDem = "Demande d'information";
        var strLibDemNom = "demandeinfo";
        var strLibDemCourt = "DI";
        var strLibSupp = "Support/D\351blocage";
        var strLibSuppNom = "suppdeb";
        var strLibSuppCourt = "SD";
        var strLibAnal = "En Analyse";
        var strLibAnalNom = "analyse";
        var strLibAnalCourt = "AN";
        var strLibCorr = "Correction";
        var strLibCorrNom = "correction";
        var strLibCorrCourt = "CO";
        var strLibMain = "Pris en main";
        var strLibMainNom = "enmain";
        var strLibMainCourt = "PM";
        var strLibEnCours = "En cours";
        var strLibEnCoursNom = "encours";
        var strLibEnCoursCourt = "EC";
        var strLibNearClose = "Bient\364t ferm\351";
        var strLibNearCloseNom = "bientotferme";
        var strLibNearCloseCourt = "BF";
        var strLibPotClose = "Potencielement ferm\351";
        var strLibPotCloseNom = "potferme";
        var strLibPotCloseCourt = "PF";
        var strLibBanette = "Banette";
        var strLibBanetteNom = "banette";
        var strLibBanetteCourt = "BA";
        var strLibBacklog = "Backlog";
        var strLibBacklogNom = "backlog";
        var strLibBacklogCourt = "BL";
        var strLibCountTime = "Temps moy";
        var strLibCountTimeNom = "tempsmoyen";
        var strLibCountTimeCourt = "TM";
        var strLibCountRetour = "Retour";
        var strLibCountRetourNom = "retour";
        var strLibCountRetourCourt = "RT";
        var strLibCountEmis = "Emis";
        var strLibCountEmisNom = "Emis";
        var strLibCountEmisCourt = "EM";
        var strLibCountRR = "Ratio retour";
        var strLibCountRRNom = "ratioRetour";
        var strLibCountRRCourt = "RR";
        var strLibUO = "UO r\351el";
        var strLibUONom = "uo";
        var strLibUOCourt = "UO";
        
        var strLibCountP1 = "P1";
        var strLibCountP1Nom = "P1";
        var strLibCountP1Court = "P1";
        var strLibCountP1Dep = "P1 d\351pass\351";
        var strLibCountP1DepNom = "p1dep";
        var strLibCountP1DepCourt = "P1D";
        var strLibCountTimeP1 = "Temps moy P1";
        var strLibCountTimeP1Nom = "Tempsmoyp1";
        var strLibCountTimeP1Court = "TM1";
        var strLibSLAP1 = "SLA P1";
        var strLibSLAP1Nom = "slap1";
        var strLibSLAP1Court = "SL1";

        var strLibCountP2 = "P2";
        var strLibCountP2Nom = "P2";
        var strLibCountP2Court = "P2";
        var strLibCountP2Dep = "P2 d\351pass\351";
        var strLibCountP2DepNom = "p2dep";
        var strLibCountP2DepCourt = "P2D";
        var strLibCountTimeP2 = "Temps moy P2";
        var strLibCountTimeP2Nom = "Tempsmoyp2";
        var strLibCountTimeP2Court = "TM2";
        var strLibSLAP2 = "SLA P2";
        var strLibSLAP2Nom = "slap2";
        var strLibSLAP2Court = "SL2";

        var strLibCountP3 = "P3";
        var strLibCountP3Nom = "P3";
        var strLibCountP3Court = "P3";
        var strLibCountP3Dep = "P3 d\351pass\351";
        var strLibCountP3DepNom = "p3dep";
        var strLibCountP3DepCourt = "P3D";
        var strLibCountTimeP3 = "Temps moy P3";
        var strLibCountTimeP3Nom = "Tempsmoyp3";
        var strLibCountTimeP3Court = "TM3";
        var strLibSLAP3 = "SLA P3";
        var strLibSLAP3Nom = "slap3";
        var strLibSLAP3Court = "SL3";

        var strLibCountP4 = "P4";
        var strLibCountP4Nom = "P4";
        var strLibCountP4Court = "P4";
        var strLibCountP4Dep = "P4 d\351pass\351";
        var strLibCountP4DepNom = "p4dep";
        var strLibCountP4DepCourt = "P4D";
        var strLibCountTimeP4 = "Temps moy P4";
        var strLibCountTimeP4Nom = "Tempsmoyp4";
        var strLibCountTimeP4Court = "TM4";
        var strLibSLAP4 = "SLA P4";
        var strLibSLAP4Nom = "slap4";
        var strLibSLAP4Court = "SL4";
		
        var strLibHPI = "Happies Notes";
        var strLibHPINom = "happpies";
        var strLibHPICourt = "HPI";

        var tabRespName = new Array();
		
		///////////////////
		//BLOCK FONCTIONS EVENEMENTS
		///////////////////
    
        $(document).on('pageinit',function() {
            try {
		        //
            }
            catch (er) {
                log(0, "ERROR(init_tab_indic):" + er.message);
            }
        });
		
		$(document).on('pageshow',function() {
			try {
				//
			}
			catch (er) {
				log(0, "ERROR(show):" + er.message);
			}
		});
		
		//Fin chargement page
		function OnLoad() {
            try {
				// Init commun
				init_commun();
				
				//
				show_commun();
			
				chargeFilterUserForm();
                chargeTypeOrderForm();

				// Init page
                chargeTabBannette();
            }
            catch (er) {
                log(0, "ERROR(refreshG):" + er.message);
            }
        }
		
		///////////////////
		//BLOCK FONCTIONS METIER
		///////////////////

        function chargeFilterUserForm() {
            try {
                tabRespName = getTabUsers();
				
				var myObj = document.getElementById("filterUser");
				
				myObj.options[myObj.options.length] = new Option("Tous", "Tous");
				
				for (var indice in tabRespName) {
					myObj.options[myObj.options.length] = new Option(tabRespName[indice][0], tabRespName[indice][0]);
                }
				
				$("#filterUser").selectmenu('refresh', true);

                tabRespName['TOTAL'] = ["TOTAL", "Total", ""];
            }
            catch (er) {
                log(0, "ERROR(chargeFilterUserForm):" + er.message);
            }
        }
		
		// pour graph bannette
		function chargeTabBannette() {
            try {
                var htmlTabBannette = "";
				var tabResultatTabBannette = new Array();

				tabResultatTabBannette = getTabResultatTabBannette();

				var tabCat = new Array();

				for (var indice in tabResultatTabBannette) {
				    tabCat[tabCat.length] = tabResultatTabBannette[indice][0];
				}

				var tabSeries = new Array();
				var tabSubSeries_Sn3 = new Array();
				var tabSubSeries_horsSn3 = new Array();
				var tabSubSeries_retour = new Array();
				var tabSubSeries_emis = new Array();

				for (var indice in tabResultatTabBannette) {
                    tabSubSeries_Sn3[tabSubSeries_Sn3.length] = parseInt(tabResultatTabBannette[indice][1]);
					tabSubSeries_horsSn3[tabSubSeries_horsSn3.length] = parseInt(tabResultatTabBannette[indice][2]);
					tabSubSeries_retour[tabSubSeries_retour.length] = parseInt(tabResultatTabBannette[indice][3]);
					tabSubSeries_emis[tabSubSeries_emis.length] = parseInt(tabResultatTabBannette[indice][4]);
				}
				
				tabSeries[tabSeries.length] = {
					name: "Sn3",
					data: tabSubSeries_Sn3
				};
				
				tabSeries[tabSeries.length] = {
					name: "Hors Sn3",
					data: tabSubSeries_horsSn3
				};
				
				tabSeries[tabSeries.length] = {
					name: "Retours",
					data: tabSubSeries_retour
				};
				
				tabSeries[tabSeries.length] = {
					name: "Emis",
					data: tabSubSeries_emis
				};
				
				afficheBannette(tabCat, tabSeries);
            }
            catch (er) {
                log(0, "ERROR(chargeTabBannette):" + er.message);
            }
        }

        function AfficherResultat(dateBegin, dateEnd, typeOrder, typeOrderAscDesc, p_dateStatutBegin, p_dateStatutEnd) {
            try {
				var tabResultatTabIndic = new Array();

                var tabFilterUser = $("#filterUser").val();

                var tabUsersToDisplay = new Array();
                for (var indice in tabFilterUser) {
                    if (tabFilterUser[indice] != "Tous") {
                        tabUsersToDisplay[tabUsersToDisplay.length]=tabFilterUser[indice];
                    }
                }

                var paramFiltreUser = "";
                if (tabUsersToDisplay.length > 0) {
                    paramFiltreUser = " AND `responsable` in ('xxx'";
                    for (var indice in tabUsersToDisplay) {
                        paramFiltreUser += " ,'" + tabUsersToDisplay[indice] + "' ";
                    }
                    paramFiltreUser += ") ";
                } else {
                    paramFiltreUser = " AND `responsable` in ('xxx'";
                    for (var indice in tabRespName) {
                        paramFiltreUser += " ,'" + tabRespName[indice][0] + "' ";
                    }
                    paramFiltreUser += ") ";
                }

                if (dateBegin == "") {
                    dateBegin = "01/01/1970";
                }
                if (dateEnd == "") {
                    dateEnd = "01/01/2070";
                }

                if (p_dateStatutBegin == "") {
                    dateStatutBegin = "01/01/1970";
                } else {
                    dateStatutBegin = p_dateStatutBegin;
                }

                if (p_dateStatutEnd == "") {
                    dateStatutEnd = "01/01/2070";
                } else {
                    dateStatutEnd = p_dateStatutEnd;
                }

                tabResultatTabIndic = getTabIndic(dateBegin, dateEnd, typeOrder, typeOrderAscDesc, paramFiltreUser, dateStatutBegin, dateStatutEnd);
				
				var html = getHTMLTabIndic(tabResultatTabIndic, typeOrder, dateBegin, dateEnd, dateStatutBegin, dateStatutEnd);
				
				$("#the-table").remove();
				$("#forTable").append(html).trigger('create');
				
				$( "#content_tabIndic" ).trigger( "expand" );
            }
            catch (er) {
                log(0, "ERROR(AfficherResultat):" + er.message);
            }
        }
		
		///////////////////
		//BLOCK FONCTIONS BD
		///////////////////

        function getTabIndic(dateBegin, dateEnd, typeOrder, typeOrderAscDesc, paramFiltreUser, p_dateStatutBegin, p_dateStatutEnd) {
            try {
                var strResponse = "";
                var returns = new Array();
                var tempTab = new Array();
                var tempSubTab = new Array();

                var reg = new RegExp("[/]", "g");
                var strDateBegin = dateBegin.replace(reg, '');
                var strDateEnd = dateEnd.replace(reg, '');
                var strDateStatutBegin = p_dateStatutBegin.replace(reg, '');
                var strDateStatutEnd = p_dateStatutEnd.replace(reg, '');

                xhr_object = new AJ();

                var url = "phpsql/mysql_getTabIndic.php?milis=" + getMilise() + "&dateBegin=" + strDateBegin + "&dateEnd=" + strDateEnd + "&typeOrder=" + typeOrder + "&typeOrderAscDesc=" + typeOrderAscDesc + "&paramFiltreUser=" + paramFiltreUser + "&dateStatutBegin=" + strDateStatutBegin + "&dateStatutEnd=" + strDateStatutEnd;

                xhr_object.open("GET", url, false);
                xhr_object.send(null);
                if (xhr_object.readyState == 4) {
                    strResponse = xhr_object.responseText;
                } else {
                    strResponse = "ERROR";
                }

                tempTab = strResponse.split("\n");

                for (var indice in tempTab) {
                    tempSubTab = tempTab[indice].split("&");
                    if (tempSubTab.length > 1) {
                        returns[returns.length] = tempSubTab.slice(0, tempSubTab.length - 1);
                    }
                }

                delete xhr_object;

                return returns;
            }
            catch (er) {
                log(0, "ERROR(getTabIndic):" + er.message);
            }
        }
		
		function getTabResultatTabBannette() {
            try {
                var strResponse = "";
                var returns = new Array();
                var tempTab = new Array();
                var tempSubTab = new Array();

                xhr_object = new AJ();

                var url = "phpsql/mysql_getDetailsBanette.php?milis="+getMilise()+"&ctrl=ok";

                xhr_object.open("GET", url, false);
                xhr_object.send(null);
                if (xhr_object.readyState == 4) {
                    strResponse = xhr_object.responseText;
                } else {
                    strResponse = "ERROR";
                }

                tempTab = strResponse.split("\n");

                for (var indice in tempTab) {
                    tempSubTab = tempTab[indice].split("&");
                    if (tempSubTab.length > 1) {
                        returns[returns.length] = tempSubTab.slice(0, tempSubTab.length - 1);
                    }
                }

                delete xhr_object;

                return returns;
            }
            catch (er) {
                log(0, "ERROR(getTabResultatTabBannette):" + er.message);
            }
        }

		
		///////////////////
		//BLOCK FONCTIONS AFFICHAGE
		///////////////////
		
		function afficheBannette(p_tabCat, p_tabSeries) {
            var chart;

			$(document).ready(function() {
				chart = new Highcharts.Chart({
					exporting: {
						url: 'http://export.highcharts.com',
						filename: 'bannettes',
						width: 1600
					},
					chart: {
						renderTo: 'div_graphBannettes',
						defaultSeriesType: 'column'
					},
					title: {
						text: 'Bannette du LOT2'
					},
					subtitle: {
						text: 'Source: ODA.'
					},
					xAxis: {
						categories: p_tabCat
					},
					yAxis: {
						min: 0,
						title: {
							text: 'Nombre de toc :'
						}
					},
					legend: {
						layout: 'vertical',
						backgroundColor: '#FFFFFF',
						align: 'r',
						verticalAlign: 'top',
						x: 200,
						y: 0,
						floating: true,
						shadow: true
					},
					tooltip: {
						formatter: function() {
							return '' +
								this.x + ': ' + this.y + '.';
						}
					},
					plotOptions: {
						column: {
							pointPadding: 0.2,
							borderWidth: 0
						}
					},
					series: p_tabSeries
				});
			});
        }
		
        function getHTMLTabIndic(tabResultatTabIndic, typeOrder, p_dateBegin, p_dateEnd, p_dateStatutBegin, p_dateStatutEnd) {
            try {
                var strRetour = "";

                strBaliseColFerm = "";
                strBaliseColDem = "";
                strBaliseColSupp = "";
                strBaliseColAnal = "";
                strBaliseColCorr = "";
                strBaliseColMain = "";
                strBaliseColEnCours = "";
                strBaliseColNearClose = "";
                strBaliseColPotClose = "";
                strBaliseColBanette = "";
                strBaliseColBacklog = "";
                strBaliseColCountTime = "";
                strBaliseColCountRetour = "";
                strBaliseColCountEmis = "";
                strBaliseColCountP1 = "";
                strBaliseColCountP1Dep = "";
                strBaliseColCountTimeP1 = "";
                strBaliseColCountP2 = "";
                strBaliseColCountP2Dep = "";
                strBaliseColCountTimeP2 = "";
                strBaliseColCountP3 = "";
                strBaliseColCountP3Dep = "";
                strBaliseColCountTimeP3 = "";
                strBaliseColCountP4 = "";
                strBaliseColCountP4Dep = "";
                strBaliseColCountTimeP4 = "";
                strBaliseColSLAP1 = "";
                strBaliseColSLAP2 = "";
                strBaliseColSLAP3 = "";
                strBaliseColSLAP4 = "";
                strBaliseColRR = "";
                strBaliseColHPI= "";
                strBaliseColUO= "";

                switch (typeOrder) {
                    case strLibFermeNom:
                        strBaliseColFerm = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibDemNom:
                        strBaliseColDem = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibSuppNom:
                        strBaliseColSupp = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibAnalNom:
                        strBaliseColAnal = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCorrNom:
                        strBaliseColCorr = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibMainNom:
                        strBaliseColMain = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibEnCoursNom:
                        strBaliseColEnCours = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibNearCloseNom:
                        strBaliseColNearClose = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibPotCloseNom:
                        strBaliseColPotClose = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibBanetteNom:
                        strBaliseColBanette = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibBacklogNom:
                        strBaliseColBacklog = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountTimeNom:
                        strBaliseColCountTime = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountRetourNom:
                        strBaliseColCountRetour = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountEmisNom:
                        strBaliseColCountEmis = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountP1Nom:
                        strBaliseColCountP1 = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountP1DepNom:
                        strBaliseColCountP1Dep = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountTimeP1Nom:
                        strBaliseColCountTimeP1 = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountP2Nom:
                        strBaliseColCountP2 = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountP2DepNom:
                        strBaliseColCountP2Dep = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountTimeP2Nom:
                        strBaliseColCountTimeP2 = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountP3Nom:
                        strBaliseColCountP3 = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountP3DepNom:
                        strBaliseColCountP3Dep = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountTimeP3Nom:
                        strBaliseColCountTimeP3 = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountP4Nom:
                        strBaliseColCountP4 = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountP4DepNom:
                        strBaliseColCountP4Dep = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountTimeP4Nom:
                        strBaliseColCountTimeP4 = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibSLAP1Nom:
                        strBaliseColSLAP1 = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibSLAP2Nom:
                        strBaliseColSLAP2 = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibSLAP3Nom:
                        strBaliseColSLAP3 = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibSLAP4Nom:
                        strBaliseColSLAP4 = " BGCOLOR=\"#CECECE\" ";
                        break;
                    case strLibCountRRNom:
                        strBaliseColRR = " BGCOLOR=\"#CECECE\" ";
                        break;
					case strLibHPINom:
						strBaliseColHPI = " BGCOLOR=\"#CECECE\" ";
                        break;
					case strLibUONom:
						strBaliseColUO = " BGCOLOR=\"#CECECE\" ";
                        break;
                    default:
                        break;
                }

				strRetour += "<div id=\"the-table\">";
                strRetour += "<table data-role=\"table\" data-mode=\"columntoggle\" data-column-btn-mini=\"true\" id=\"my-table\" class=\"ui-body-d ui-shadow table-stripe ui-responsive\" data-column-btn-theme=\"c\" data-column-btn-text=\"Choix des colonnes\" data-column-popup-theme=\"c\" data-column-popup-mini=\"true\">";
                strRetour += "<thead>";
                strRetour += "<TR>";
                strRetour += "<TH>Respon</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColMain + ">" + strLibMainCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColDem + ">" + strLibDemCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColAnal + ">" + strLibAnalCourt + "</TH>";
                strRetour += "<TH data-priority=\"1\" style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\" " + strBaliseColEnCours + ">" + strLibEnCoursCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColSupp + ">" + strLibSuppCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCorr + ">" + strLibCorrCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColNearClose + ">" + strLibNearCloseCourt + "</TH>";
                strRetour += "<TH data-priority=\"5\"" + strBaliseColFerm + ">" + strLibFermeCourt + "</TH>";
                strRetour += "<TH data-priority=\"1\" style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\" " + strBaliseColPotClose + ">" + strLibPotCloseCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColBanette + ">" + strLibBanetteCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColBacklog + ">" + strLibBacklogCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountRetour + ">" + strLibCountRetourCourt + "</TH>";
                strRetour += "<TH data-priority=\"5\"" + strBaliseColRR + ">" + strLibCountRRCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountEmis + ">" + strLibCountEmisCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountTime + ">" + strLibCountTimeCourt + "</TH>";
                strRetour += "<TH data-priority=\"1\" style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\"  " + strBaliseColUO + ">" + strLibUOCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountP1 + ">" + strLibCountP1Court + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountP1Dep + ">" + strLibCountP1DepCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountTimeP1 + ">" + strLibCountTimeP1Court + "</TH>";
                strRetour += "<TH data-priority=\"1\" style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\"  " + strBaliseColSLAP1 + ">" + strLibSLAP1Court + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountP2 + ">" + strLibCountP2Court + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountP2Dep + ">" + strLibCountP2DepCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountTimeP2 + ">" + strLibCountTimeP2Court + "</TH>";
                strRetour += "<TH data-priority=\"1\" style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\"  " + strBaliseColSLAP2 + ">" + strLibSLAP2Court + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountP3 + ">" + strLibCountP3Court + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountP3Dep + ">" + strLibCountP3DepCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountTimeP3 + ">" + strLibCountTimeP3Court + "</TH>";
                strRetour += "<TH data-priority=\"1\" style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\"  " + strBaliseColSLAP3 + ">" + strLibSLAP3Court + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountP4 + ">" + strLibCountP4Court + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountP4Dep + ">" + strLibCountP4DepCourt + "</TH>";
                strRetour += "<TH data-priority=\"6\"" + strBaliseColCountTimeP4 + ">" + strLibCountTimeP4Court + "</TH>";
                strRetour += "<TH data-priority=\"1\" style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\"  " + strBaliseColSLAP4 + ">" + strLibSLAP4Court + "</TH>";
				if (tabInfoLogin[0][3] == 1) {
					strRetour += "<TH data-priority=\"1\" style=\"border-left-color: #000000; border-left-style: groove; border-left-width: thin;\" " + strBaliseColHPI + ">" + strLibHPICourt + "</TH>";
				}
                
                strRetour += "</TR>";
                strRetour += "</thead>";
                strRetour += "<tbody>";
                
                for (var indice in tabResultatTabIndic) {
                    strRetour += "<TR onMouseOver=\"changeCouleur(this);\" onMouseOut=\"remetCouleur(this);\" >";
                    strRetour += "<TD><a target=\"_new\" href=\"page_boad.html?user=" + tabResultatTabIndic[indice][0] + "&dateBegin=" + p_dateBegin + "&dateEnd=" + p_dateEnd + "&dateStatutBegin=" + p_dateStatutBegin + "&dateStatutEnd=" + p_dateStatutEnd + "\" title=\"" + tabRespName[tabResultatTabIndic[indice][0]][1] + " " + tabRespName[tabResultatTabIndic[indice][0]][2] + "\" >" + tabResultatTabIndic[indice][0] + "</a> </TD>";
                    strRetour += "<TD " + strBaliseColMain + ">" + tabResultatTabIndic[indice][3] + "</TD>";
                    strRetour += "<TD " + strBaliseColDem + ">" + tabResultatTabIndic[indice][4] + "</TD>";
                    strRetour += "<TD " + strBaliseColAnal + ">" + tabResultatTabIndic[indice][7] + "</TD>";
                    strRetour += "<TD style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\" " + strBaliseColEnCours + ">" + tabResultatTabIndic[indice][8] + "</TD>";
                    strRetour += "<TD " + strBaliseColCorr + ">" + tabResultatTabIndic[indice][5] + "</TD>";
                    strRetour += "<TD " + strBaliseColSupp + ">" + tabResultatTabIndic[indice][6] + "</TD>";
                    strRetour += "<TD " + strBaliseColNearClose + ">" + tabResultatTabIndic[indice][9] + "</TD>";
                    strRetour += "<TD " + strBaliseColFerm + ">" + tabResultatTabIndic[indice][2] + "</TD>";
                    strRetour += "<TD style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\" " + strBaliseColPotClose + ">" + tabResultatTabIndic[indice][10] + "</TD>";
                    strRetour += "<TD " + strBaliseColBanette + ">" + tabResultatTabIndic[indice][1] + "</TD>";
                    strRetour += "<TD " + strBaliseColBacklog + ">" + tabResultatTabIndic[indice][11] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountRetour + ">" + tabResultatTabIndic[indice][29] + "</TD>";
                    strRetour += "<TD " + strBaliseColRR + ">" + tabResultatTabIndic[indice][31] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountEmis + ">" + tabResultatTabIndic[indice][30] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountTime + ">" + intToTimeChar(tabResultatTabIndic[indice][12]) + "</TD>";
                    strRetour += "<TD style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\" " + strBaliseColUO + ">" + tabResultatTabIndic[indice][33] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountP1 + ">" + tabResultatTabIndic[indice][13] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountP1Dep + ">" + tabResultatTabIndic[indice][14] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountTimeP1 + ">" + intToTimeChar(tabResultatTabIndic[indice][15]) + "</TD>";
                    strRetour += "<TD style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\" " + strBaliseColSLAP1 + ">" + tabResultatTabIndic[indice][16] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountP2 + ">" + tabResultatTabIndic[indice][17] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountP2Dep + ">" + tabResultatTabIndic[indice][18] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountTimeP2 + ">" + intToTimeChar(tabResultatTabIndic[indice][19]) + "</TD>";
                    strRetour += "<TD style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\" " + strBaliseColSLAP2 + ">" + tabResultatTabIndic[indice][20] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountP3 + ">" + tabResultatTabIndic[indice][21] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountP3Dep + ">" + tabResultatTabIndic[indice][22] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountTimeP3 + ">" + intToTimeChar(tabResultatTabIndic[indice][23]) + "</TD>";
                    strRetour += "<TD style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\" " + strBaliseColSLAP3 + ">" + tabResultatTabIndic[indice][24] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountP4 + ">" + tabResultatTabIndic[indice][25] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountP4Dep + ">" + tabResultatTabIndic[indice][26] + "</TD>";
                    strRetour += "<TD " + strBaliseColCountTimeP4 + ">" + intToTimeChar(tabResultatTabIndic[indice][27]) + "</TD>";
                    strRetour += "<TD style=\"border-right-color: #000000; border-right-style: groove; border-right-width: thin;\" " + strBaliseColSLAP4 + ">" + tabResultatTabIndic[indice][28] + "</TD>";
					if (tabInfoLogin[0][3] == 1) {
						strRetour += "<TD style=\"border-left-color: #000000; border-left-style: groove; border-left-width: thin;\" " + strBaliseColHPI + ">" + tabResultatTabIndic[indice][32] + "</TD>";
					}
                    strRetour += "</TR>";
                }
				
                strRetour += "</tbody>";
				strRetour += "</table>";
				strRetour += "</div>";
                
                return strRetour;
            }
            catch (er) {
                log(0, "ERROR(gethTMLTabIndic):" + er.message);
            }
        }

        function chargeTypeOrderForm() {
            try {
				var myObj = document.getElementById("typeOrder");
				
				myObj.options[myObj.options.length] = new Option(strLibMain,strLibMainNom);
                myObj.options[myObj.options.length] = new Option(strLibDem,strLibDemNom);
                myObj.options[myObj.options.length] = new Option(strLibAnal,strLibAnalNom);
                myObj.options[myObj.options.length] = new Option(strLibEnCours,strLibEnCoursNom);
                myObj.options[myObj.options.length] = new Option(strLibSupp,strLibSuppNom);
                myObj.options[myObj.options.length] = new Option(strLibCorr,strLibCorrNom);
                myObj.options[myObj.options.length] = new Option(strLibNearClose,strLibNearCloseNom);
                myObj.options[myObj.options.length] = new Option(strLibPotClose,strLibPotCloseNom);
                myObj.options[myObj.options.length] = new Option(strLibFerme,strLibFermeNom, true, true);
                myObj.options[myObj.options.length] = new Option(strLibBanette,strLibBanetteNom);
                myObj.options[myObj.options.length] = new Option(strLibBacklog,strLibBacklogNom);
                myObj.options[myObj.options.length] = new Option(strLibCountTime,strLibCountTimeNom);
                myObj.options[myObj.options.length] = new Option(strLibCountRetour,strLibCountRetourNom);
                myObj.options[myObj.options.length] = new Option(strLibCountRR,strLibCountRRNom);
                myObj.options[myObj.options.length] = new Option(strLibCountEmis,strLibCountEmisNom);
                myObj.options[myObj.options.length] = new Option(strLibUO,strLibUONom);
                myObj.options[myObj.options.length] = new Option(strLibCountP1,strLibCountP1Nom);
                myObj.options[myObj.options.length] = new Option(strLibCountP1Dep,strLibCountP1DepNom);
                myObj.options[myObj.options.length] = new Option(strLibSLAP1,strLibSLAP1Nom);
                myObj.options[myObj.options.length] = new Option(strLibCountTimeP1,strLibCountTimeP1Nom);
                myObj.options[myObj.options.length] = new Option(strLibCountP2,strLibCountP2Nom);
                myObj.options[myObj.options.length] = new Option(strLibCountP2Dep,strLibCountP2DepNom);
                myObj.options[myObj.options.length] = new Option(strLibSLAP2,strLibSLAP2Nom);
                myObj.options[myObj.options.length] = new Option(strLibCountTimeP2,strLibCountTimeP2Nom);
                myObj.options[myObj.options.length] = new Option(strLibCountP3,strLibCountP3Nom);
                myObj.options[myObj.options.length] = new Option(strLibCountP3Dep,strLibCountP3DepNom);
                myObj.options[myObj.options.length] = new Option(strLibSLAP3,strLibSLAP3Nom);
                myObj.options[myObj.options.length] = new Option(strLibCountTimeP3,strLibCountTimeP3Nom);
                myObj.options[myObj.options.length] = new Option(strLibCountP4,strLibCountP4Nom);
                myObj.options[myObj.options.length] = new Option(strLibCountP4Dep,strLibCountP4DepNom);
                myObj.options[myObj.options.length] = new Option(strLibSLAP4,strLibSLAP4Nom);
                myObj.options[myObj.options.length] = new Option(strLibCountTimeP4,strLibCountTimeP4Nom);
				if (tabInfoLogin[0][3] == 1) {
					myObj.options[myObj.options.length] = new Option(strLibHPI,strLibHPINom);
				}
				
				$("#typeOrder").selectmenu('refresh', true);
            }
            catch (er) {
                log(0, "ERROR(chargeTypeOrderForm):" + er.message);
            }
        }
    </script>
	
  </head>
  <body onload="OnLoad();">
    
	<!-- page -->
	<div data-role="page" data-title="Titre">
	
		<!-- /panel -->
		<div data-role="panel" id="mypanel" data-display="overlay" data-position="left">

		</div>
		<!-- /panel -->
	
		<!-- header -->
		<div data-role="header" data-position="fixed">
			<a href="#mypanel" data-role="button" data-icon="home" data-iconpos="notext">home</a>
			<h1 id="id_titre">titre</h1>
			<a href="javascript:window.location = ('./page_contact.html?mili='+getMilise());" data-role="button" data-icon="info" data-iconpos="notext">Contact</a>
		</div>
		<!-- /header -->

		<!-- content -->
		<div data-role="content" id="main_content">
			<div data-role="collapsible" data-collapsed="false" data-mini="true" id="content_tabrech">
				<h3>Votre recherche</h3>
				<FORM method="post" id="formTabIndic" action="#">
				
					<div class="ui-grid-b">
						<div class="ui-block-a"><label for="dateDepart">Tickets cr&eacute;&eacute;s apr&egrave;s le :</label><input type="text" name="dateDepart" id="dateDepart" data-mini="true" placeholder="(DD/MM/YYYY)" /></div>
						<div class="ui-block-b"><label for="dateFin">Tickets cr&eacute;&eacute;s avant le :</label><input type="text" name="dateFin" id="dateFin" data-mini="true" placeholder="(DD/MM/YYYY)" /></div>	   
						<div class="ui-block-c">Autoremplissage pour le mois en cours : <a href="javascript:inputMoisEnCours('dateDepart','dateFin');" data-role="button" data-inline="true" data-mini="true" title="Mois en cours">M</a></div>	   
					</div>
					<div class="ui-grid-b">
						<div class="ui-block-a"><label for="dateStatutBegin">Tickets avec statut apr&egrave;s le :</label><input type="text" name="dateStatutBegin" id="dateStatutBegin" data-mini="true" placeholder="(DD/MM/YYYY)" /></div>
						<div class="ui-block-b"><label for="dateStatutEnd">Tickets avec statut avant le :</label><input type="text" name="dateStatutEnd" id="dateStatutEnd" data-mini="true" placeholder="(DD/MM/YYYY)" /></div>
						<div class="ui-block-c">Autoremplissage pour le mois en cours : <br><a href="javascript:inputMoisEnCoursRH('dateStatutBegin','dateStatutEnd');" data-role="button" data-inline="true" data-mini="true" title="Mois en cours">M</a></div>
					</div>
					
					<div class="ui-grid-b">
						<div class="ui-block-a">
							<legend>Trier/Ordonner/Filtrer :</legend>
							<div data-role="fieldcontain">
								<fieldset data-role="controlgroup" data-type="horizontal">
									<label for="typeOrder">Trier</label>
									<SELECT name="typeOrder" id="typeOrder" data-mini="true" data-native-menu="false">
										<option value="" data-placeholder="true">Trier</option>
									</SELECT>
									<label for="typeOrder">Ordonner</label>
									<SELECT name="typeOrderAscDesc" id="typeOrderAscDesc" data-mini="true" data-native-menu="false">
										<option value="" data-placeholder="true">Ordre</option>
										<option value="asc">Ascendant</option>
										<option value="desc" selected>Descendant</option>
									</SELECT>
									<label for="typeOrder">Filtrer</label>
									<SELECT name="filterUser" id="filterUser" data-mini="true" multiple="multiple" data-native-menu="false" size="4">
										<option value="" data-placeholder="true">Filtrer</option>
									</SELECT>
								</fieldset>
						</div>
						<div class="ui-block-b">
							</div>
						</div>
						<div class="ui-block-c"></div>
					</div>
					
					<a href="javascript:AfficherResultat(document.forms.formTabIndic.dateDepart.value, document.forms.formTabIndic.dateFin.value, document.forms.formTabIndic.typeOrder.value, document.forms.formTabIndic.typeOrderAscDesc.value, document.forms.formTabIndic.dateStatutBegin.value, document.forms.formTabIndic.dateStatutEnd.value);" data-role="button" data-inline="true" data-icon="arrow-r" data-mini="true">Afficher les resultats</a>
					
				</FORM>
			</div>
			
			<div data-role="collapsible" data-mini="true" id="content_tabIndic" data-collapsed="true">
				<h3>Le tableau des indicateurs</h3>
				<div id="forTable"></div>
			</div>
			
			<div data-role="collapsible" data-mini="true" id="content_banette" data-collapsed="false">
				<h3>Les bannettes</h3>
				<div id="div_graphBannettes">Pas de r&eacute;sultat.</div>
			</div>
		</div>
		<!-- /content -->
		
		<!-- footer -->
		<div data-role="footer" data-position="fixed">
			<a data-role="button" data-icon="search" data-iconpos="notext" class="ui-btn-left" href="javascript:window.location = ('./page_faq.html?mili='+getMilise());">FAQ</a>
			<h1 id="id_affichageUser">User</h1>
			<a data-role="button" data-icon="delete" data-iconpos="notext" class="ui-btn-right" href="javascript:window.location = ('./page_sortie.html?mili='+getMilise());">Logout</a>
		</div>
		<!-- /footer -->
		
	</div>
	<!-- /page -->
</body>
</html>